var express = require('express');
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
  res.render('index', { title: 'Express' });
});


//获取list数据
router.get('/api/goods/list', function (res, req, next) {
  req.send({
    code: 0,
    data: [
      {
        category: '热门推荐',
        project: {
          imgUrl: 'https://img02.hua.com/slider/21_day0614_all.jpg?b1',
          obj: [
            {
              name: '',
              obj: [
                { title: '送恋人鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Lover.png' },
                { title: '送长辈鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Elder.png' },
                { title: '生日鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Birthday.png' },
                { title: '礼盒鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Boxedflowers.png' },
                { title: '永生花', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_PPF.png' },
                { title: '蛋糕', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Cake.png' },
                { title: '元祖蛋糕', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Cake_ganso.png' },
                { title: '金箔花', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Goldfoilflower.png' },
                { title: '首饰', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Jewelry.png' },
                { title: '巧克力', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_Chocolates.png' },
                { title: '创意礼品', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_CreativeGifts.png' },
                { title: '企业团购', img: 'https://img02.hua.com/m/category/Classification/m_category_hot_Groupbuy.png' },
              ]
            }
          ]
        }
      },
      {
        category: '鲜花',
        project: {
          imgUrl: 'https://img02.hua.com/m/category/Classification/flower.png?v',
          obj: [
            {
              name: '对象',
              obj: [
                { title: '全部', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_All.png' },
                { title: '送女友鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_1-2Girlfriend.png' },
                { title: '送男性鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_Boyfriend.png' },
                { title: '送长辈鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_Elder.png' },
                { title: '送朋友鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_Friend.png' },
              ]
            },
            {
              name: "场合",
              obj: [
                { title: '爱情鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Love.png' },
                { title: '生日鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Birthday.png' },
                { title: '探望慰问', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Visit.png' },
                { title: '商务鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Business.png' },
                { title: '祝福庆贺', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Congratulate.png' },
                { title: '婚庆鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Wedding.png' },
                { title: '道歉鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Apologize.png' },
                { title: '哀思鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_Grief.png' },
                { title: '港澳台鲜花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_occ_gat.png' },
              ]
            },
            {
              name: '花材',
              obj: [
                { title: '玫瑰', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Rose.png' },
                { title: '康乃馨', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Carnation.png' },
                { title: '向日葵', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Sunflower.png' },
                { title: '百合', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Lily.png' },
                { title: '绣球', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Hydrangea.png' },
                { title: '郁金香', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Tulips.png' },
                { title: '扶郎/太阳花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Gerbera.png' },
                { title: '马蹄莲', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_mat_Calla.png' },
              ]
            },
            {
              name: '玫瑰颜色',
              obj: [
                { title: '红玫瑰', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_colour_Red.png?v' },
                { title: '粉玫瑰', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_colour_Pink.png?v' },
                { title: '白玫瑰', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_colour_White.png?v' },
                { title: '紫玫瑰', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_colour_Purple.png?v' },
                { title: '黄玫瑰', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_colour_Yellow.png?v' },
                { title: '香槟色', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_colour_Champagne.png?v' },
              ]
            },
            {
              name: '类别',
              obj: [
                { title: '花束', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_kind_bouquet.png' },
                { title: '花盒', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_kind_bouquet.png' },
                { title: '桌面花篮', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_kind_flowerbasket.png' },
                { title: '瓶插花', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_kind_bottle.png' },
                { title: '果篮', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_kind_Fruitbasket.png' },
                { title: '开业花篮', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_kind_business.png' },
              ]
            },
            {
              name: '价格',
              obj: [
                { title: '特价鲜花', img: '' },
                { title: '150元以下', img: '' },
                { title: '150-200元', img: '' },
                { title: '250-350元', img: '' },
                { title: '350-550元', img: '' },
                { title: '550-800元', img: '' },
                { title: '800元以上', img: '' },
              ]
            },
            {
              name: '枝数',
              obj: [
                { title: '9枝', img: '' },
                { title: '11枝', img: '' },
                { title: '19枝', img: '' },
                { title: '22枝', img: '' },
                { title: '29枝', img: '' },
                { title: '33枝', img: '' },
                { title: '50枝', img: '' },
                { title: '66枝', img: '' },
                { title: '99枝以上', img: '' },
              ]
            },
          ]
        }
      },
      {
        category: '永生花',
        project: {
          imgUrl: 'https://img02.hua.com/m/category/Classification/ppf.png?v',
          obj: [
            {
              name: '对象',
              obj: [
                { title: '全部', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_All.png' },
                { title: '送女友', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_use_Girlfriend.png' },
                { title: '送男性', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_use_Boyfriend.png' },
                { title: '送长辈', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_use_Elder.png' },
                { title: '送朋友', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_use_Friend.png' },
              ]
            },
            {
              name: '分类',
              obj: [
                { title: '永生花瓶', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_sort_Vase.png' },
                { title: '经典花盒', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_sort_Box.png' },
                { title: '特色永生花', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_sort_Special.png' },
                { title: '巨型玫瑰', img: 'https://img02.hua.com/m/category/Classification/m_category_ppf_sort_GiantRose.png' },
              ]
            }
          
          ]
        }
      },
      {
        category: '蛋糕',
        project: {
        imgUrl: 'https://img02.hua.com/m/category/Classification/cake.png',
        obj: [
          {
            name: '品牌',
            obj: [
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_xfxb.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_ganso.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_ganso.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_lecake.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_vcaketop.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_boncake.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_waffleboy.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_micamika.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_21cake.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_cheesecake.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_cakeboss.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_pantry.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_cream.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_balibeitian.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_haagendazs.png' },
              { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_cake_all.png' },
            ]
            
          }
        ]
      }},
      {
        category: '特色礼品',
        project: {
          imgUrl: 'https://img02.hua.com/m/category/Classification/gift.png?v',
          obj: [
            {
              name: '品牌',
              obj: [
                { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_brand_All.png' },
                { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_brand_SWAROVSKI.png' },
                { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_brand_GlamEver.png' },
                { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_brand_Dior.png' },
                { title: '', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_brand_MW.png' },
                { title: '', img: 'https://m.hua.com/all.html#gift' },
              ]
            },
            {
              name: '对象',
              obj: [
                { title: '送女友', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Girlfriend.png' },
                { title: '送男性', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Boyfriend.png' },
                { title: '送长辈', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Elder.png' },
                { title: '送朋友', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Friend.png' },
                { title: '送客户', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Customer.png' },
                { title: '送老师', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Teacher.png' },
                { title: '送小孩', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Child.png' },
                { title: '送领导', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_use_Leader.png' },
              ]
            },
            {
              name: '分类',
              obj: [
                { title: '音乐盒', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_Musicbox.png' },
                { title: '金箔花', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_Goldfoilflower.png' },
                { title: '3D水晶内雕', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_3DCrystal.png' },
                { title: '首饰/美妆', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_JewelryBeauty.png' },
                { title: '巧克力', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_Chocolates.png' },
                { title: '公仔/睡枕', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_dolls.png' },
                { title: '家居生活', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_HomeLife.png' },
                { title: '摆件/其他', img: 'https://img02.hua.com/m/category/Classification/m_category_gift_sort_OrnamentsOthers.png' },
              ]
            }
          ]
        }
      },
      {
        category: '礼篮',
        project: {
          imgUrl: 'https://img02.hua.com/m/category/Classification/hamper.png',
          obj: [
            {
              name: '礼篮',
              obj: [
                { title: '礼篮', img: 'https://img02.hua.com/m/category/Classification/m_category_Hamper.png' }
              ]
            }
          ]
         
        }
      },
      {
        category: '绿植花卉',
        project: {
          imgUrl: 'https://img02.hua.com/m/category/Classification/plants.png?v',
          obj: [
            {
              name: '绿植花卉',
              obj: [
                { title: '全部', img: 'https://img02.hua.com/m/category/Classification/m_category_flowers_use_All.png' },
                { title: '绿色植物', img: 'https://img02.hua.com/m/category/Classification/m_category_Plants_Green.png' },
                { title: '绿色植物', img: 'https://img02.hua.com/m/category/Classification/m_category_Plants_Potted.png' },
                { title: '绿色植物', img: 'https://img02.hua.com/m/category/Classification/m_category_Plants_Succulent.png' },
              ]
            }
          ]
        }
      },
    ]
  })
})


router.get('/api/homelist', function (req, res, next) {
  res.send({
    code: 0,
    data: [
      { name:'鲜花',imgUrl:'https://img02.hua.com/wx_imgs/home_flowers.png'},
      { name:'永生花',imgUrl:'https://img02.hua.com/wx_imgs/home_forever.png'},
      { name:'蛋糕',imgUrl:'https://img02.hua.com/wx_imgs/home_cakes.png'},
      { name:'礼品',imgUrl:'https://img02.hua.com/wx_imgs/home_gifts.png'},
      { name:'巧克力',imgUrl:'https://img02.hua.com/wx_imgs/home_chocolate.png'},
      { name:'生日祝福',imgUrl:'https://img02.hua.com/wx_imgs/home_birthday_1224.png'},
      { name:'表白求婚',imgUrl:'https://img02.hua.com/wx_imgs/home_express_1224.png'},
      { name:'上午开业',imgUrl:'https://img02.hua.com/wx_imgs/home_business_1224.png'},
      { name:'周年纪念',imgUrl:'https://img02.hua.com/wx_imgs/home_anniversary_1224.png'},
      { name:'企业团购',imgUrl:'https://img02.hua.com/wx_imgs/home_group_1224.png'},
    ]
  })
})
module.exports = router;
